package pack.enviroment;

import com.jme.renderer.ColorRGBA;
import com.jme.scene.state.FogState;
import com.jme.system.DisplaySystem;

public class Fog 
{
	private FogState fs;
	
	public void build(DisplaySystem disp)
	{
		fs = disp.getRenderer().createFogState();
		fs.setDensity(0.5f);
		fs.setColor(new ColorRGBA(0.5f,0.5f,0.5f,0.5f));
		fs.setEnd(60);
		fs.setStart(40);
		fs.setDensityFunction(FogState.DensityFunction.Exponential);
		fs.setQuality(FogState.Quality.PerVertex); 		
	}
	
	public FogState getFog(){
		return fs;
	}
}
